<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Cache-Control" content="no-siteapp" />

    <title>快速开始</title>
    <meta name="description" content="  简介  安装          Master版本                  使用curl          使用wget          使用powershell                    Windows      MacOS      Linux      注：此处为镜像文档，最新在线...">

    
    <meta name="keywords" content="xmake,文档,快速开始,tboox" /> 

    <!-- qq oauth -->
    <meta property="qc:admins" content="5211601217706727767255" />

    <!--icon -->
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" sizes="192x192" href="/static/img/nice-highres.png" />
	<link rel="apple-touch-icon-precomposed" href="/static/img/apple-touch-icon-57x57-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/img/apple-touch-icon-72x72-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/img/apple-touch-icon-114x114-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/img/apple-touch-icon-144x144-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="180x180" href="/static/img/retinahd_icon.png" />
	<meta name="msapplication-TileImage" content="/static/img/retinahd_icon.png" />
	
    <link rel="stylesheet" href=" /css/fontawesome/css/font-awesome.min.css ">
    <link rel="stylesheet" href=" /css/main.css ">
    <link rel="canonical" href="https://tboox.org/cn/docs/xmake/quickstart/">
    <link rel="alternate" type="application/rss+xml" title="TBOOX Open Source Project" href="https://tboox.org/feed.xml ">
    <link rel="alternate" hreflang="en" href="https://tboox.org/" />
    <link rel="alternate" hreflang="zh-Hans" href="https://tboox.org/cn/" />

    <!-- css -->
    <link href="/css/reward.css" rel="stylesheet" type="text/css"> 




    <script type="text/javascript">
    function isPC(){    
        var userAgentInfo = navigator.userAgent;  
        var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");    
        var flag = true;    
        for (var v = 0; v < Agents.length; v++) {    
            if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; }    
        }    
        return flag;    
    }
    </script>

<!-- baidu ads -->



    <!-- baidu ads -->

</head>


  <body>

    <header id="top">
    <div class="wrapper">
        <a href="/cn" class="brand">TBOOX</a>
        <button id="headerMenu" class="menu"><i class="fa fa-bars"></i></button>
        <nav id="headerNav">
            <ul>
                <li>
                    
                    <a href="/?lang=0">
                    
                        <i class="fa fa-home"></i>English
                    </a>
                </li>

                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/project/">
                            
                        
                            <i class="fa fa-bookmark"></i>项目
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/archive/">
                            
                        
                            <i class="fa fa-archive"></i>归档
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/category/">
                            
                        
                            <i class="fa fa-th-list"></i>分类
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/tag/">
                            
                        
                            <i class="fa fa-tags"></i>标记
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/docs/">
                            
                        
                            <i class="fa fa-book"></i>文档
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="https://xmake.io/#/zh-cn/about/contact" target="_blank" >
                            
                        
                            <i class="fa fa-forumbee"></i>社区
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/donation/">
                            
                        
                            <i class="fa fa-heart"></i>捐助
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/about/">
                            
                        
                            <i class="fa fa-user"></i>关于
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            </ul>
        </nav>
    </div>
</header>



        <div class="page clearfix" post>
    <div class="left">
        <h1>快速开始</h1>
        <div class="label">

            <div class="label-card">
                <i class="fa fa-calendar"></i>2000-02-22
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
            


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#xmake" title="Category: xmake" rel="category">xmake</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


            </div>

            <div class="label-card">
            
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <!--a href="/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a-->
        <a href="/cn/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a>&nbsp;
    
        <!--a href="/tag/#%E6%96%87%E6%A1%A3" title="Tag: 文档" rel="tag">文档</a-->
        <a href="/cn/tag/#文档" title="Tag: 文档" rel="tag">文档</a>&nbsp;
    
        <!--a href="/tag/#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B" title="Tag: 快速开始" rel="tag">快速开始</a-->
        <a href="/cn/tag/#快速开始" title="Tag: 快速开始" rel="tag">快速开始</a>
    
  

</span>

            </div>

        </div>
        <hr>
        <article itemscope itemtype="http://schema.org/BlogPosting">
        <ul id="markdown-toc">
  <li><a href="#简介" id="markdown-toc-简介">简介</a></li>
  <li><a href="#安装" id="markdown-toc-安装">安装</a>    <ul>
      <li><a href="#master版本" id="markdown-toc-master版本">Master版本</a>        <ul>
          <li><a href="#使用curl" id="markdown-toc-使用curl">使用curl</a></li>
          <li><a href="#使用wget" id="markdown-toc-使用wget">使用wget</a></li>
          <li><a href="#使用powershell" id="markdown-toc-使用powershell">使用powershell</a></li>
        </ul>
      </li>
      <li><a href="#windows" id="markdown-toc-windows">Windows</a></li>
      <li><a href="#macos" id="markdown-toc-macos">MacOS</a></li>
      <li><a href="#linux" id="markdown-toc-linux">Linux</a></li>
      <li><a href="#编译安装" id="markdown-toc-编译安装">编译安装</a></li>
    </ul>
  </li>
  <li><a href="#快速开始" id="markdown-toc-快速开始">快速开始</a>    <ul>
      <li><a href="#创建工程" id="markdown-toc-创建工程">创建工程</a></li>
      <li><a href="#构建工程" id="markdown-toc-构建工程">构建工程</a></li>
      <li><a href="#运行程序" id="markdown-toc-运行程序">运行程序</a></li>
      <li><a href="#调试程序" id="markdown-toc-调试程序">调试程序</a></li>
    </ul>
  </li>
  <li><a href="#工程实例" id="markdown-toc-工程实例">工程实例</a>    <ul>
      <li><a href="#可执行程序" id="markdown-toc-可执行程序">可执行程序</a></li>
      <li><a href="#静态库程序" id="markdown-toc-静态库程序">静态库程序</a></li>
      <li><a href="#动态库程序" id="markdown-toc-动态库程序">动态库程序</a></li>
    </ul>
  </li>
  <li><a href="#配置" id="markdown-toc-配置">配置</a>    <ul>
      <li><a href="#目标平台" id="markdown-toc-目标平台">目标平台</a>        <ul>
          <li><a href="#主机平台" id="markdown-toc-主机平台">主机平台</a></li>
          <li><a href="#linux-1" id="markdown-toc-linux-1">Linux</a></li>
          <li><a href="#android" id="markdown-toc-android">Android</a></li>
          <li><a href="#iphoneos" id="markdown-toc-iphoneos">iPhoneOS</a></li>
          <li><a href="#windows-1" id="markdown-toc-windows-1">Windows</a></li>
          <li><a href="#mingw" id="markdown-toc-mingw">Mingw</a></li>
          <li><a href="#apple-watchos" id="markdown-toc-apple-watchos">Apple WatchOS</a></li>
          <li><a href="#交叉编译" id="markdown-toc-交叉编译">交叉编译</a>            <ul>
              <li><a href="#sdk" id="markdown-toc-sdk">–sdk</a></li>
              <li><a href="#toolchains" id="markdown-toc-toolchains">–toolchains</a></li>
              <li><a href="#cross" id="markdown-toc-cross">–cross</a></li>
              <li><a href="#as" id="markdown-toc-as">–as</a></li>
              <li><a href="#cc" id="markdown-toc-cc">–cc</a></li>
              <li><a href="#cxx" id="markdown-toc-cxx">–cxx</a></li>
              <li><a href="#ld" id="markdown-toc-ld">–ld</a></li>
              <li><a href="#sh" id="markdown-toc-sh">–sh</a></li>
              <li><a href="#ar" id="markdown-toc-ar">–ar</a></li>
            </ul>
          </li>
        </ul>
      </li>
      <li><a href="#全局配置" id="markdown-toc-全局配置">全局配置</a></li>
      <li><a href="#清除配置" id="markdown-toc-清除配置">清除配置</a></li>
    </ul>
  </li>
  <li><a href="#问答" id="markdown-toc-问答">问答</a>    <ul>
      <li><a href="#怎样获取更多参数选项信息" id="markdown-toc-怎样获取更多参数选项信息">怎样获取更多参数选项信息？</a></li>
      <li><a href="#怎样实现静默构建不输出任何信息" id="markdown-toc-怎样实现静默构建不输出任何信息">怎样实现静默构建，不输出任何信息？</a></li>
      <li><a href="#如果xmake运行失败了怎么办" id="markdown-toc-如果xmake运行失败了怎么办">如果xmake运行失败了怎么办？</a></li>
      <li><a href="#怎样看实时编译警告信息" id="markdown-toc-怎样看实时编译警告信息">怎样看实时编译警告信息?</a></li>
      <li><a href="#怎样基于源码自动生成xmakelua" id="markdown-toc-怎样基于源码自动生成xmakelua">怎样基于源码自动生成xmake.lua</a></li>
    </ul>
  </li>
  <li><a href="#支持项目" id="markdown-toc-支持项目">支持项目</a></li>
  <li><a href="#赞助项目" id="markdown-toc-赞助项目">赞助项目</a></li>
</ul>

<p>注：此处为镜像文档，最新在线文档请看：<a href="http://xmake.io/#/zh/">http://xmake.io/#/zh/</a></p>

<p>
<div align="center">
  <a href="http://xmake.io/cn">
    <img width="200" heigth="200" src="https://tboox.org/static/img/xmake/logo256c.png" />
  </a>  

  <h1>xmake</h1>

  <div>
    <a href="https://travis-ci.org/tboox/xmake">
      <img src="https://img.shields.io/travis/tboox/xmake/master.svg?style=flat-square" alt="travis-ci" />
    </a>
    <a href="https://ci.appveyor.com/project/waruqi/xmake/branch/master">
      <img src="https://img.shields.io/appveyor/ci/waruqi/xmake/master.svg?style=flat-square" alt="appveyor-ci" />
    </a>
    <a href="https://codecov.io/gh/tboox/xmake">
      <img src="https://img.shields.io/codecov/c/github/tboox/xmake/master.svg?style=flat-square" alt="Coverage" />
    </a>
    <a href="https://github.com/xmake-io/xmake/releases">
      <img src="https://img.shields.io/github/release/tboox/xmake.svg?style=flat-square" alt="Github All Releases" />
    </a>
    <a href="https://aur.archlinux.org/packages/xmake">
      <img src="https://img.shields.io/aur/votes/xmake.svg?style=flat-square" alt="AUR votes" />
    </a>
  </div>
  <div>
    <a href="https://github.com/xmake-io/xmake/blob/master/LICENSE.md">
      <img src="https://img.shields.io/github/license/tboox/xmake.svg?colorB=f48041&amp;style=flat-square" alt="license" />
    </a>
    <a href="https://gitter.im/tboox/tboox?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge">
      <img src="https://img.shields.io/gitter/room/tboox/tboox.svg?style=flat-square&amp;colorB=96c312" alt="Gitter" />
    </a>
    <a href="https://t.me/joinchat/F2dIAw5iTkDUMwCQ_8CStw">
      <img src="https://img.shields.io/badge/chat-on%20telegram-blue.svg?style=flat-square" alt="Telegram" />
    </a>
    <a href="https://tboox.bearychat.com/signup/98bf6970b9f889d6ae3fbc3d50ee8a36">
      <img src="https://img.shields.io/badge/chat-on%20bearychat-brightgreen.svg?style=flat-square" alt="Bearychat" />
    </a>
    <a href="https://jq.qq.com/?_wv=1027&amp;k=5hpwWFv">
      <img src="https://img.shields.io/badge/chat-on%20QQ-ff69b4.svg?style=flat-square" alt="QQ" />
    </a>
    <a href="http://xmake.io/cn/pages/donation.html#donate">
      <img src="https://img.shields.io/badge/donate-us-orange.svg?style=flat-square" alt="Donate" />
    </a>
  </div>

  <p>一个基于Lua的轻量级跨平台自动构建工具</p>
</div>
</p>

<h2 id="简介">简介</h2>

<p>XMake是一个基于Lua的轻量级跨平台自动构建工具，支持在各种主流平台上构建项目</p>

<p>xmake的目标是开发者更加关注于项目本身开发，简化项目的描述和构建，并且提供平台无关性，使得一次编写，随处构建</p>

<p>它跟cmake、automake、premake有点类似，但是机制不同，它默认不会去生成IDE相关的工程文件，采用直接编译，并且更加的方便易用
采用lua的工程描述语法更简洁直观，支持在大部分常用平台上进行构建，以及交叉编译</p>

<p>并且xmake提供了创建、配置、编译、打包、安装、卸载、运行等一些actions，使得开发和构建更加的方便和流程化。</p>

<p>不仅如此，它还提供了许多更加高级的特性，例如插件扩展、脚本宏记录、批量打包、自动文档生成等等。。</p>

<h2 id="安装">安装</h2>

<h4 id="master版本">Master版本</h4>

<h5 id="使用curl">使用curl</h5>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code>bash &lt;<span class="o">(</span>curl -fsSL https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.sh<span class="o">)</span>
</code></pre>
</div>

<h5 id="使用wget">使用wget</h5>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code>bash &lt;<span class="o">(</span>wget https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.sh -O -<span class="o">)</span>
</code></pre>
</div>

<h5 id="使用powershell">使用powershell</h5>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code>Invoke-Expression <span class="o">(</span>Invoke-Webrequest <span class="s1">'https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.ps1'</span> -UseBasicParsing<span class="o">)</span>.Content
</code></pre>
</div>

<h4 id="windows">Windows</h4>

<ol>
  <li>从 <a href="https://github.com/xmake-io/xmake/releases">Releases</a> 上下载windows安装包</li>
  <li>运行安装程序 xmake-[version].exe</li>
</ol>

<h4 id="macos">MacOS</h4>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>ruby -e <span class="s2">"</span><span class="k">$(</span>curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install<span class="k">)</span><span class="s2">"</span>
<span class="gp">$ </span>brew install xmake
</code></pre>
</div>

<p>或者：</p>

<ol>
  <li>从 <a href="https://github.com/xmake-io/xmake/releases">Releases</a> 上下载pkg安装包</li>
  <li>双击运行</li>
</ol>

<p>或者安装master版本:</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="c"># 使用homebrew安装master版本</span>
<span class="gp">$ </span>brew install xmake --HEAD

<span class="c"># 或者直接调用shell下载安装</span>
<span class="gp">$ </span>bash &lt;<span class="o">(</span>curl -fsSL https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.sh<span class="o">)</span>
</code></pre>
</div>

<h4 id="linux">Linux</h4>

<p>在archlinux上安装：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>yaourt xmake
</code></pre>
</div>

<p>在ubuntu上安装：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo add-apt-repository ppa:tboox/xmake
<span class="gp">$ </span>sudo apt-get update
<span class="gp">$ </span>sudo apt-get install xmake
</code></pre>
</div>

<p>或者手动添加包源：</p>

<div class="highlighter-rouge"><pre class="highlight"><code>deb http://ppa.launchpad.net/tboox/xmake/ubuntu yakkety main 
deb-src http://ppa.launchpad.net/tboox/xmake/ubuntu yakkety main 
</code></pre>
</div>

<p>然后执行：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo apt-get update
<span class="gp">$ </span>sudo apt-get install xmake
</code></pre>
</div>

<p>或者下载deb包来安装：</p>

<ol>
  <li>从 <a href="https://github.com/xmake-io/xmake/releases">Releases</a> 上下载deb安装包</li>
  <li>运行: <code class="highlighter-rouge">dpkg -i xmake-xxxx.deb</code></li>
</ol>

<p>在<code class="highlighter-rouge">redhat/centos</code>上安装：</p>

<ol>
  <li>从 <a href="https://github.com/xmake-io/xmake/releases">Releases</a> 上下载rpm安装包</li>
  <li>运行: <code class="highlighter-rouge">yum install xmake-xxx.rpm --nogpgcheck</code></li>
</ol>

<h4 id="编译安装">编译安装</h4>

<p>通过脚本编译安装:</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>git clone https://github.com/xmake-io/xmake.git
<span class="gp">$ </span><span class="nb">cd</span> ./xmake
<span class="gp">$ </span>./scripts/get.sh __local__
</code></pre>
</div>

<p>仅仅安装和更新xmake的lua脚本:</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>./scripts/get.sh __local__ __install_only__
</code></pre>
</div>

<p>卸载:</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>./scripts/get.sh __uninstall__
</code></pre>
</div>

<p>通过make进行编译安装:</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>make build; sudo make install
</code></pre>
</div>

<p>安装到其他指定目录:</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo make install <span class="nv">prefix</span><span class="o">=</span>/usr/local
</code></pre>
</div>

<p>卸载:</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo make uninstall
</code></pre>
</div>

<h2 id="快速开始">快速开始</h2>

<p><a href="https://asciinema.org/a/133693"><img src="https://asciinema.org/a/133693.png" alt="asciicast" /></a></p>

<h4 id="创建工程">创建工程</h4>

<p>创建一个名叫<code class="highlighter-rouge">hello</code>的<code class="highlighter-rouge">c</code>控制台工程：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake create -l c -P ./hello
</code></pre>
</div>

<p>执行完后，将会生成一个简单工程结构：</p>

<div class="highlighter-rouge"><pre class="highlight"><code>hello
├── src
│   └── main.c
└── xmake.lua
</code></pre>
</div>

<p>其中<code class="highlighter-rouge">xmake.lua</code>是工程描述文件，内容非常简单，告诉xmake添加<code class="highlighter-rouge">src</code>目录下的所有<code class="highlighter-rouge">.c</code>源文件：</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">target</span><span class="p">(</span><span class="s2">"hello"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*.c"</span><span class="p">)</span> 
</code></pre>
</div>

<p>目前支持的语言如下：</p>

<ul>
  <li>c/c++</li>
  <li>objc/c++</li>
  <li>asm</li>
  <li>swift</li>
  <li>dlang</li>
  <li>golang</li>
  <li>rust</li>
</ul>

<p class="tip">
    如果你想了解更多参数选项，请运行: `xmake create --help`
</p>

<h4 id="构建工程">构建工程</h4>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake
</code></pre>
</div>

<h4 id="运行程序">运行程序</h4>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake run hello
</code></pre>
</div>

<h4 id="调试程序">调试程序</h4>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake run -d hello 
</code></pre>
</div>

<p>xmake将会使用系统自带的调试器去加载程序运行，目前支持：lldb, gdb, windbg, vsjitdebugger, ollydbg 等各种调试器。</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="o">[</span>lldb]<span class="nv">$target</span> create <span class="s2">"build/hello"</span>
Current executable <span class="nb">set </span>to <span class="s1">'build/hello'</span> <span class="o">(</span>x86_64<span class="o">)</span>.
<span class="o">[</span>lldb]<span class="nv">$b</span> main
Breakpoint 1: where <span class="o">=</span> hello<span class="sb">`</span>main, address <span class="o">=</span> 0x0000000100000f50
<span class="o">[</span>lldb]<span class="nv">$r</span>
Process 7509 launched: <span class="s1">'/private/tmp/hello/build/hello'</span> <span class="o">(</span>x86_64<span class="o">)</span>
Process 7509 stopped
<span class="k">*</span> thread <span class="c">#1: tid = 0x435a2, 0x0000000100000f50 hello`main, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1</span>
    frame <span class="c">#0: 0x0000000100000f50 hello`main</span>
hello<span class="sb">`</span>main:
<span class="gp">-&gt;  </span>0x100000f50 &lt;+0&gt;:  pushq  %rbp
    0x100000f51 &lt;+1&gt;:  movq   %rsp, %rbp
    0x100000f54 &lt;+4&gt;:  leaq   0x2b<span class="o">(</span>%rip<span class="o">)</span>, %rdi          ; <span class="s2">"hello world!"</span>
    0x100000f5b &lt;+11&gt;: callq  0x100000f64               ; symbol stub <span class="k">for</span>: puts
<span class="o">[</span>lldb]<span class="err">$</span>
</code></pre>
</div>

<p class="tip">
    你也可以使用简写的命令行选项，例如: `xmake r` 或者 `xmake run`
</p>

<h2 id="工程实例">工程实例</h2>

<h4 id="可执行程序">可执行程序</h4>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">target</span><span class="p">(</span><span class="s2">"test"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*c"</span><span class="p">)</span>
</code></pre>
</div>

<h4 id="静态库程序">静态库程序</h4>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">target</span><span class="p">(</span><span class="s2">"library"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"static"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/library/*.c"</span><span class="p">)</span>

<span class="n">target</span><span class="p">(</span><span class="s2">"test"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*c"</span><span class="p">)</span>
    <span class="n">add_deps</span><span class="p">(</span><span class="s2">"library"</span><span class="p">)</span>
</code></pre>
</div>

<p>通过<code class="highlighter-rouge">add_deps</code>将一个静态库自动链接到test可执行程序。</p>

<h4 id="动态库程序">动态库程序</h4>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">target</span><span class="p">(</span><span class="s2">"library"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"shared"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/library/*.c"</span><span class="p">)</span>

<span class="n">target</span><span class="p">(</span><span class="s2">"test"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*c"</span><span class="p">)</span>
    <span class="n">add_deps</span><span class="p">(</span><span class="s2">"library"</span><span class="p">)</span>
</code></pre>
</div>

<p>通过<code class="highlighter-rouge">add_deps</code>将一个动态库自动链接到test可执行程序。</p>

<h2 id="配置">配置</h2>

<p>通过<code class="highlighter-rouge">xmake f|config</code>配置命令，设置构建前的相关配置信息，详细参数选项，请运行: <code class="highlighter-rouge">xmake f --help</code>。</p>

<p class="tip">
    你可以使用命令行缩写来简化输入，也可以使用全名，例如: <br />
    `xmake f` 或者 `xmake config`.<br />
    `xmake f -p linux` 或者 `xmake config --plat=linux`.
</p>

<h4 id="目标平台">目标平台</h4>

<h5 id="主机平台">主机平台</h5>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake
</code></pre>
</div>

<p class="tip">
    xmake将会自动探测当前主机平台，默认自动生成对应的目标程序。
</p>

<h5 id="linux-1">Linux</h5>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux <span class="o">[</span>-a i386|x86_64]
<span class="gp">$ </span>xmake
</code></pre>
</div>

<h5 id="android">Android</h5>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p android --ndk<span class="o">=</span>~/files/android-ndk-r10e/ <span class="o">[</span>-a armv5te|armv6|armv7-a|armv8-a|arm64-v8a]
<span class="gp">$ </span>xmake
</code></pre>
</div>

<p>如果要手动指定ndk中具体某个工具链，而不是使用默认检测的配置，可以通过<a href="#-toolchains">–toolchains</a>来设置，例如：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p android --ndk<span class="o">=</span>~/files/android-ndk-r10e/ -a arm64-v8a --toolchains<span class="o">=</span>~/files/android-ndk-r10e/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin
</code></pre>
</div>

<p><a href="#-toolchains">–toolchains</a>主要用于设置选择编译工具的具体bin目录，这个的使用跟<a href="#交叉编译">交叉编译</a>中的<a href="#-toolchains">–toolchains</a>的行为是一致的。</p>

<p class="tip">
如果手动设置了`toolchains`的bin目录，没有通过检测，可以看下是否`--arch=`参数没有匹配对。
</p>

<h5 id="iphoneos">iPhoneOS</h5>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p iphoneos <span class="o">[</span>-a armv7|armv7s|arm64|i386|x86_64]
<span class="gp">$ </span>xmake
</code></pre>
</div>

<h5 id="windows-1">Windows</h5>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p windows <span class="o">[</span>-a x86|x64]
<span class="gp">$ </span>xmake
</code></pre>
</div>

<h5 id="mingw">Mingw</h5>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p mingw --sdk<span class="o">=</span>/usr/local/i386-mingw32-4.3.0/ <span class="o">[</span>-a i386|x86_64]
<span class="gp">$ </span>xmake
</code></pre>
</div>

<h5 id="apple-watchos">Apple WatchOS</h5>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p watchos <span class="o">[</span>-a i386|armv7k]
<span class="gp">$ </span>xmake
</code></pre>
</div>

<h5 id="交叉编译">交叉编译</h5>

<p>linux平台的交叉编译：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux --sdk<span class="o">=</span>/usr/local/arm-linux-gcc/ <span class="o">[</span>--toolchains<span class="o">=</span>/sdk/bin] <span class="o">[</span>--cross<span class="o">=</span>arm-linux-]
<span class="gp">$ </span>xmake
</code></pre>
</div>

<p>其他平台的交叉编译：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p cross --sdk<span class="o">=</span>/usr/local/arm-xxx-gcc/ <span class="o">[</span>--toolchains<span class="o">=</span>/sdk/bin] <span class="o">[</span>--cross<span class="o">=</span>arm-linux-]
<span class="gp">$ </span>xmake
</code></pre>
</div>

<p>如果不关心实际的平台名，只想交叉编译，可以直接用上面的命令，如果需要通过<code class="highlighter-rouge">is_plat("myplat")</code>判断自己的平台逻辑，则：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p myplat --sdk<span class="o">=</span>/usr/local/arm-xxx-gcc/ <span class="o">[</span>--toolchains<span class="o">=</span>/sdk/bin] <span class="o">[</span>--cross<span class="o">=</span>arm-linux-]
<span class="gp">$ </span>xmake
</code></pre>
</div>

<p>其中：</p>

<table>
  <thead>
    <tr>
      <th>参数名</th>
      <th>描述</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a href="#-sdk">–sdk</a></td>
      <td>设置交叉工具链的sdk根目录</td>
    </tr>
    <tr>
      <td><a href="#-toolchains">–toolchains</a></td>
      <td>设置工具链bin目录</td>
    </tr>
    <tr>
      <td><a href="#-cross">–cross</a></td>
      <td>设置交叉工具链工具前缀</td>
    </tr>
    <tr>
      <td><a href="#-as">–as</a></td>
      <td>设置<code class="highlighter-rouge">asm</code>汇编器</td>
    </tr>
    <tr>
      <td><a href="#-cc">–cc</a></td>
      <td>设置<code class="highlighter-rouge">c</code>编译器</td>
    </tr>
    <tr>
      <td><a href="#-cxx">–cxx</a></td>
      <td>设置<code class="highlighter-rouge">c++</code>编译器</td>
    </tr>
    <tr>
      <td><a href="#-mm">–mm</a></td>
      <td>设置<code class="highlighter-rouge">objc</code>编译器</td>
    </tr>
    <tr>
      <td><a href="#-mxx">–mxx</a></td>
      <td>设置<code class="highlighter-rouge">objc++</code>编译器</td>
    </tr>
    <tr>
      <td><a href="#-sc">–sc</a></td>
      <td>设置<code class="highlighter-rouge">swift</code>编译器</td>
    </tr>
    <tr>
      <td><a href="#-gc">–gc</a></td>
      <td>设置<code class="highlighter-rouge">golang</code>编译器</td>
    </tr>
    <tr>
      <td><a href="#-dc">–dc</a></td>
      <td>设置<code class="highlighter-rouge">dlang</code>编译器</td>
    </tr>
    <tr>
      <td><a href="#-rc">–rc</a></td>
      <td>设置<code class="highlighter-rouge">rust</code>编译器</td>
    </tr>
    <tr>
      <td><a href="#-ld">–ld</a></td>
      <td>设置<code class="highlighter-rouge">c/c++/objc/asm</code>链接器</td>
    </tr>
    <tr>
      <td><a href="#-sh">–sh</a></td>
      <td>设置<code class="highlighter-rouge">c/c++/objc/asm</code>共享库链接器</td>
    </tr>
    <tr>
      <td><a href="#-ar">–ar</a></td>
      <td>设置<code class="highlighter-rouge">c/c++/objc/asm</code>静态库归档器</td>
    </tr>
    <tr>
      <td><a href="#-sc-ld">–sc-ld</a></td>
      <td>设置<code class="highlighter-rouge">swift</code>链接器</td>
    </tr>
    <tr>
      <td><a href="#-sc-sh">–sc-sh</a></td>
      <td>设置<code class="highlighter-rouge">swift</code>共享库链接器</td>
    </tr>
    <tr>
      <td><a href="#-gc-ld">–gc-ld</a></td>
      <td>设置<code class="highlighter-rouge">golang</code>链接器</td>
    </tr>
    <tr>
      <td><a href="#-gc-ar">–gc-ar</a></td>
      <td>设置<code class="highlighter-rouge">golang</code>静态库归档器</td>
    </tr>
    <tr>
      <td><a href="#-dc-ld">–dc-ld</a></td>
      <td>设置<code class="highlighter-rouge">dlang</code>链接器</td>
    </tr>
    <tr>
      <td><a href="#-dc-sh">–dc-sh</a></td>
      <td>设置<code class="highlighter-rouge">dlang</code>共享库链接器</td>
    </tr>
    <tr>
      <td><a href="#-dc-ar">–dc-ar</a></td>
      <td>设置<code class="highlighter-rouge">dlang</code>静态库归档器</td>
    </tr>
    <tr>
      <td><a href="#-rc-ld">–rc-ld</a></td>
      <td>设置<code class="highlighter-rouge">rust</code>链接器</td>
    </tr>
    <tr>
      <td><a href="#-rc-sh">–rc-sh</a></td>
      <td>设置<code class="highlighter-rouge">rust</code>共享库链接器</td>
    </tr>
    <tr>
      <td><a href="#-rc-ar">–rc-ar</a></td>
      <td>设置<code class="highlighter-rouge">rust</code>静态库归档器</td>
    </tr>
    <tr>
      <td><a href="#-asflags">–asflags</a></td>
      <td>设置<code class="highlighter-rouge">asm</code>汇编编译选项</td>
    </tr>
    <tr>
      <td><a href="#-cflags">–cflags</a></td>
      <td>设置<code class="highlighter-rouge">c</code>编译选项</td>
    </tr>
    <tr>
      <td><a href="#-cxflags">–cxflags</a></td>
      <td>设置<code class="highlighter-rouge">c/c++</code>编译选项</td>
    </tr>
    <tr>
      <td><a href="#-cxxflags">–cxxflags</a></td>
      <td>设置<code class="highlighter-rouge">c++</code>编译选项</td>
    </tr>
    <tr>
      <td><a href="#-mflags">–mflags</a></td>
      <td>设置<code class="highlighter-rouge">objc</code>编译选项</td>
    </tr>
    <tr>
      <td><a href="#-mxflags">–mxflags</a></td>
      <td>设置<code class="highlighter-rouge">objc/c++</code>编译选项</td>
    </tr>
    <tr>
      <td><a href="#-mxxflags">–mxxflags</a></td>
      <td>设置<code class="highlighter-rouge">objc++</code>编译选项</td>
    </tr>
    <tr>
      <td><a href="#-scflags">–scflags</a></td>
      <td>设置<code class="highlighter-rouge">swift</code>编译选项</td>
    </tr>
    <tr>
      <td><a href="#-gcflags">–gcflags</a></td>
      <td>设置<code class="highlighter-rouge">golang</code>编译选项</td>
    </tr>
    <tr>
      <td><a href="#-dcflags">–dcflags</a></td>
      <td>设置<code class="highlighter-rouge">dlang</code>编译选项</td>
    </tr>
    <tr>
      <td><a href="#-rcflags">–rcflags</a></td>
      <td>设置<code class="highlighter-rouge">rust</code>编译选项</td>
    </tr>
    <tr>
      <td><a href="#-ldflags">–ldflags</a></td>
      <td>设置链接选项</td>
    </tr>
    <tr>
      <td><a href="#-shflags">–shflags</a></td>
      <td>设置共享库链接选项</td>
    </tr>
    <tr>
      <td><a href="#-arflags">–arflags</a></td>
      <td>设置静态库归档选项</td>
    </tr>
  </tbody>
</table>

<p class="tip">
如果你想要了解更多参数选项，请运行: `xmake f --help`。
</p>

<h6 id="sdk">–sdk</h6>

<ul>
  <li>设置交叉工具链的sdk根目录</li>
</ul>

<p>大部分情况下，都不需要配置很复杂的toolchains前缀，例如：<code class="highlighter-rouge">arm-linux-</code> 什么的</p>

<p>只要这个工具链的sdk目录满足如下结构（大部分的交叉工具链都是这个结构）：</p>

<div class="highlighter-rouge"><pre class="highlight"><code>/home/toolchains_sdkdir
   - bin
       - arm-linux-gcc
       - arm-linux-ld
       - ...
   - lib
       - libxxx.a
   - include
       - xxx.h
</code></pre>
</div>

<p>那么，使用xmake进行交叉编译的时候，只需要进行如下配置和编译：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux --sdk<span class="o">=</span>/home/toolchains_sdkdir
<span class="gp">$ </span>xmake
</code></pre>
</div>

<p>这个时候，xmake会去自动探测，gcc等编译器的前缀名：<code class="highlighter-rouge">arm-linux-</code>，并且编译的时候，也会自动加上<code class="highlighter-rouge">链接库</code>和<code class="highlighter-rouge">头文件</code>的搜索选项，例如：</p>

<div class="highlighter-rouge"><pre class="highlight"><code>-I/home/toolchains_sdkdir/include -L/home/toolchains_sdkdir/lib
</code></pre>
</div>

<p>这些都是xmake自动处理的，不需要手动配置他们。。</p>

<h6 id="toolchains">–toolchains</h6>

<ul>
  <li>设置工具链bin目录</li>
</ul>

<p>对于不规则工具链目录结构，靠单纯地<a href="#-sdk">–sdk</a>选项设置，没法完全检测通过的情况下，可以通过这个选项继续附加设置工具链的bin目录位置。</p>

<p>例如：一些特殊的交叉工具链的，编译器bin目录，并不在 <code class="highlighter-rouge">/home/toolchains_sdkdir/bin</code> 这个位置，而是独立到了 <code class="highlighter-rouge">/usr/opt/bin</code></p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux --sdk<span class="o">=</span>/home/toolchains_sdkdir --toolchains<span class="o">=</span>/usr/opt/bin
<span class="gp">$ </span>xmake
</code></pre>
</div>

<h6 id="cross">–cross</h6>

<ul>
  <li>设置交叉工具链工具前缀</li>
</ul>

<p>像<code class="highlighter-rouge">aarch64-linux-android-</code>这种，通常如果你配置了<a href="-sdk">–sdk</a>或者<a href="-toolchains">–toolchains</a>的情况下，xmake会去自动检测的，不需要自己手动设置。</p>

<p>但是对于一些极特殊的工具链，一个目录下同时有多个cross前缀的工具bin混在一起的情况，你需要手动设置这个配置，来区分到底需要选用哪个bin。</p>

<p>例如，toolchains的bin目录下同时存在两个不同的编译器：</p>

<div class="highlighter-rouge"><pre class="highlight"><code>/opt/bin
 - armv7-linux-gcc
 - aarch64-linux-gcc
</code></pre>
</div>

<p>我们现在想要选用armv7的版本，则配置如下：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux --sdk<span class="o">=</span>/usr/toolsdk --toolchains<span class="o">=</span>/opt/bin --cross<span class="o">=</span>armv7-linux-
</code></pre>
</div>

<h6 id="as">–as</h6>

<ul>
  <li>设置<code class="highlighter-rouge">asm</code>汇编器</li>
</ul>

<p>如果还要继续细分选择编译器，则继续追加相关编译器选项，例如：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux --sdk<span class="o">=</span>/user/toolsdk --as<span class="o">=</span>armv7-linux-as
</code></pre>
</div>

<p>如果存在<code class="highlighter-rouge">AS</code>环境变量的话，会优先使用当前环境变量中指定的值。</p>

<p class="tips">
如果指定的编译器名不是那些xmake内置可识别的名字（带有gcc, clang等字样），那么编译器工具检测就会失败。
这个时候我们可以通过：`xmake f --as=gcc@/home/xxx/asmips.exe` 设置ccmips.exe编译器作为类gcc的使用方式来编译。
也就是说，在指定编译器为`asmips.exe`的同时，告诉xmake，它跟gcc用法和参数选项基本相同。
</p>

<h6 id="cc">–cc</h6>

<ul>
  <li>设置c编译器</li>
</ul>

<p>如果还要继续细分选择编译器，则继续追加相关编译器选项，例如：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux --sdk<span class="o">=</span>/user/toolsdk --cc<span class="o">=</span>armv7-linux-clang
</code></pre>
</div>

<p>如果存在<code class="highlighter-rouge">CC</code>环境变量的话，会优先使用当前环境变量中指定的值。</p>

<p class="tips">
如果指定的编译器名不是那些xmake内置可识别的名字（带有gcc, clang等字样），那么编译器工具检测就会失败。
这个时候我们可以通过：`xmake f --cc=gcc@/home/xxx/ccmips.exe` 设置ccmips.exe编译器作为类gcc的使用方式来编译。
也就是说，在指定编译器为`ccmips.exe`的同时，告诉xmake，它跟gcc用法和参数选项基本相同。
</p>

<h6 id="cxx">–cxx</h6>

<ul>
  <li>设置<code class="highlighter-rouge">c++</code>编译器</li>
</ul>

<p>如果还要继续细分选择编译器，则继续追加相关编译器选项，例如：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux --sdk<span class="o">=</span>/user/toolsdk --cxx<span class="o">=</span>armv7-linux-clang++
</code></pre>
</div>

<p>如果存在<code class="highlighter-rouge">CXX</code>环境变量的话，会优先使用当前环境变量中指定的值。</p>

<p class="tips">
如果指定的编译器名不是那些xmake内置可识别的名字（带有gcc, clang等字样），那么编译器工具检测就会失败。
这个时候我们可以通过：`xmake f --cxx=clang++@/home/xxx/c++mips.exe` 设置c++mips.exe编译器作为类clang++的使用方式来编译。
也就是说，在指定编译器为`c++mips.exe`的同时，告诉xmake，它跟clang++用法和参数选项基本相同。
</p>

<h6 id="ld">–ld</h6>

<ul>
  <li>设置<code class="highlighter-rouge">c/c++/objc/asm</code>链接器</li>
</ul>

<p>如果还要继续细分选择链接器，则继续追加相关编译器选项，例如：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux --sdk<span class="o">=</span>/user/toolsdk --ld<span class="o">=</span>armv7-linux-clang++
</code></pre>
</div>

<p>如果存在<code class="highlighter-rouge">LD</code>环境变量的话，会优先使用当前环境变量中指定的值。</p>

<p class="tips">
如果指定的编译器名不是那些xmake内置可识别的名字（带有gcc, clang等字样），那么链接器工具检测就会失败。
这个时候我们可以通过：`xmake f --ld=g++@/home/xxx/c++mips.exe` 设置c++mips.exe链接器作为类g++的使用方式来编译。
也就是说，在指定链接器为`c++mips.exe`的同时，告诉xmake，它跟g++用法和参数选项基本相同。
</p>

<h6 id="sh">–sh</h6>

<ul>
  <li>设置<code class="highlighter-rouge">c/c++/objc/asm</code>共享库链接器</li>
</ul>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux --sdk<span class="o">=</span>/user/toolsdk --sh<span class="o">=</span>armv7-linux-clang++
</code></pre>
</div>

<p>如果存在<code class="highlighter-rouge">SH</code>环境变量的话，会优先使用当前环境变量中指定的值。</p>

<p class="tips">
如果指定的编译器名不是那些xmake内置可识别的名字（带有gcc, clang等字样），那么链接器工具检测就会失败。
这个时候我们可以通过：`xmake f --sh=g++@/home/xxx/c++mips.exe` 设置c++mips.exe链接器作为类g++的使用方式来编译。
也就是说，在指定链接器为`c++mips.exe`的同时，告诉xmake，它跟g++用法和参数选项基本相同。
</p>

<h6 id="ar">–ar</h6>

<ul>
  <li>设置<code class="highlighter-rouge">c/c++/objc/asm</code>静态库归档器</li>
</ul>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p linux --sdk<span class="o">=</span>/user/toolsdk --ar<span class="o">=</span>armv7-linux-ar
</code></pre>
</div>

<p>如果存在<code class="highlighter-rouge">AR</code>环境变量的话，会优先使用当前环境变量中指定的值。</p>

<p class="tips">
如果指定的编译器名不是那些xmake内置可识别的名字（带有ar等字样），那么链接器工具检测就会失败。
这个时候我们可以通过：`xmake f --ar=ar@/home/xxx/armips.exe` 设置armips.exe链接器作为类ar的使用方式来编译。
也就是说，在指定链接器为`armips.exe`的同时，告诉xmake，它跟ar用法和参数选项基本相同。
</p>

<h4 id="全局配置">全局配置</h4>

<p>我们也可以将一些常用配置保存到全局配置中，来简化频繁地输入：</p>

<p>例如:</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake g --ndk<span class="o">=</span>~/files/android-ndk-r10e/
</code></pre>
</div>

<p>现在，我们重新配置和编译<code class="highlighter-rouge">android</code>程序：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p android
<span class="gp">$ </span>xmake
</code></pre>
</div>

<p>以后，就不需要每次重复配置<code class="highlighter-rouge">--ndk=</code>参数了。</p>

<p class="tip">
    每个命令都有其简写，例如: `xmake g` 或者 `xmake global`.<br />
</p>

<h4 id="清除配置">清除配置</h4>

<p>有时候，配置出了问题编译不过，或者需要重新检测各种依赖库和接口，可以加上<code class="highlighter-rouge">-c</code>参数，清除缓存的配置，强制重新检测和配置</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -c
<span class="gp">$ </span>xmake
</code></pre>
</div>

<p>或者：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -p iphoneos -c
<span class="gp">$ </span>xmake
</code></pre>
</div>

<h2 id="问答">问答</h2>

<h4 id="怎样获取更多参数选项信息">怎样获取更多参数选项信息？</h4>

<p>获取主菜单的帮助信息，里面有所有action和plugin的列表描述。</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake <span class="o">[</span>-h|--help]
</code></pre>
</div>

<p>获取配置菜单的帮助信息，里面有所有配置选项的描述信息，以及支持平台、架构列表。</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f <span class="o">[</span>-h|--help]
</code></pre>
</div>

<p>获取action和plugin命令菜单的帮助信息，里面有所有内置命令和插件任务的参数使用信息。</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake <span class="o">[</span>action|plugin] <span class="o">[</span>-h|--help]
</code></pre>
</div>

<p>例如，获取<code class="highlighter-rouge">run</code>命令的参数信息:</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake run --help
</code></pre>
</div>

<h4 id="怎样实现静默构建不输出任何信息">怎样实现静默构建，不输出任何信息？</h4>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake <span class="o">[</span>-q|--quiet]
</code></pre>
</div>

<h4 id="如果xmake运行失败了怎么办">如果xmake运行失败了怎么办？</h4>

<p>可以先尝试清除下配置，重新构建下：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -c
<span class="gp">$ </span>xmake
</code></pre>
</div>

<p>如果还是失败了，请加上 <code class="highlighter-rouge">-v</code> 或者 <code class="highlighter-rouge">--verbose</code> 选项重新执行xmake后，获取更加详细的输出信息</p>

<p>例如：</p>

<pre><code class="language-hash">$ xmake [-v|--verbose] 
</code></pre>

<p>并且可以加上 <code class="highlighter-rouge">--backtrace</code> 选项获取出错时的xmake的调试栈信息, 然后你可以提交这些信息到<a href="https://github.com/xmake-io/xmake/issues">issues</a>.</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake -v --backtrace
</code></pre>
</div>

<h4 id="怎样看实时编译警告信息">怎样看实时编译警告信息?</h4>

<p>为了避免刷屏，在构建时候，默认是不实时输出警告信息的，如果想要看的话可以加上<code class="highlighter-rouge">-w</code>选项启用编译警告输出就行了。</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake <span class="o">[</span>-w|--warning] 
</code></pre>
</div>

<h4 id="怎样基于源码自动生成xmakelua">怎样基于源码自动生成xmake.lua</h4>

<p>如果你想临时写一两个测试代码、或者手上有一些移植过来的零散源码想要快速编译运行，可以不用专门xmake.lua，直接运行：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake
</code></pre>
</div>

<p>xmake会自动扫描分析当前的源码目录，识别程序结构和类型，生成一个xmake.lua，并且会尝试直接构建它。</p>

<p>如果编译成功，可以直接运行：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake run
</code></pre>
</div>

<p>当然，如果仅仅只是想要生成xmake.lua，默认不去构建，可以执行：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake f -y
</code></pre>
</div>

<p>更多相关介绍，请参考文章：<a href="https://tboox.org/cn/2017/01/07/build-without-makefile/">xmake新增智能代码扫描编译模式，无需手写任何make文件</a></p>

<h2 id="支持项目">支持项目</h2>

<p>xmake项目属于个人开源项目，它的发展需要您的帮助，如果您愿意支持xmake项目的开发，欢迎为其捐赠，支持它的发展。 🙏 [<a href="https://opencollective.com/xmake#backer">支持此项目</a>]</p>

<p><a href="https://opencollective.com/xmake#backers" target="_blank"><img src="https://opencollective.com/xmake/backers.svg?width=890" /></a></p>

<h2 id="赞助项目">赞助项目</h2>

<p>通过赞助支持此项目，您的logo和网站链接将显示在这里。[<a href="https://opencollective.com/xmake#sponsor">赞助此项目</a>]</p>

<p><a href="https://opencollective.com/xmake/sponsor/0/website" target="_blank"><img src="https://opencollective.com/xmake/sponsor/0/avatar.svg" /></a>
<a href="https://opencollective.com/xmake/sponsor/1/website" target="_blank"><img src="https://opencollective.com/xmake/sponsor/1/avatar.svg" /></a>
<a href="https://opencollective.com/xmake/sponsor/2/website" target="_blank"><img src="https://opencollective.com/xmake/sponsor/2/avatar.svg" /></a>
<a href="https://opencollective.com/xmake/sponsor/3/website" target="_blank"><img src="https://opencollective.com/xmake/sponsor/3/avatar.svg" /></a>
<a href="https://opencollective.com/xmake/sponsor/4/website" target="_blank"><img src="https://opencollective.com/xmake/sponsor/4/avatar.svg" /></a>
<a href="https://opencollective.com/xmake/sponsor/5/website" target="_blank"><img src="https://opencollective.com/xmake/sponsor/5/avatar.svg" /></a>
<a href="https://opencollective.com/xmake/sponsor/6/website" target="_blank"><img src="https://opencollective.com/xmake/sponsor/6/avatar.svg" /></a>
<a href="https://opencollective.com/xmake/sponsor/7/website" target="_blank"><img src="https://opencollective.com/xmake/sponsor/7/avatar.svg" /></a>
<a href="https://opencollective.com/xmake/sponsor/8/website" target="_blank"><img src="https://opencollective.com/xmake/sponsor/8/avatar.svg" /></a>
<a href="https://opencollective.com/xmake/sponsor/9/website" target="_blank"><img src="https://opencollective.com/xmake/sponsor/9/avatar.svg" /></a></p>


        </article>
        <hr>

        <!-- baidu ads -->
        

        <!-- reward -->
        <div style="text-align: center;">
            <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
              <span>赏</span>
            </button>
            <div id="QR" style="display: none;">
                <div id="wechat" style="display: inline-block">
                  <img id="wechat_qr" src="/static/img/weixin.png" alt="WeChat Pay"/>
                  <p>微信打赏</p>
                </div>
                <div id="alipay" style="display: inline-block">
                  <img id="alipay_qr" src="/static/img/alipay.png" alt="Alipay"/>
                  <p>支付宝打赏</p>
                </div>
            </div>
        </div>

        
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
                    
                    <h2 id="english">English</h2>
                    <ul>
                    
                    <li class="relatedPost">
                        <a href="/docs/xmake/quickstart/">Quick Start
                        
                        </a>
                    </li>
                    
                    
                
            
        
            
        
        
            </ul>
        

        
        
            
        
            
            
            
                
                    
                        
                        <h2 id="similar_posts">相关文章</h2>
                        <ul>
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/12/17/xmake-update-v2.6.2/">xmake v2.6.2 发布，新增 Linux 内核驱动模块构建支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/12/03/xmake-update-v2.6.1/">xmake v2.6.1 发布，使用 Lua5.4 运行时，Rust 和 C++ 混合编译支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/10/30/xmake-update-v2.5.9/">xmake v2.5.9 发布，改进 C++20 模块，并支持 Nim, Keil MDK 和 Unity Build
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/10/08/xmake-update-v2.5.8/">xmake v2.5.8 发布，新增 Pascal/Swig 程序和 Lua53 运行时支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/08/29/xmake-update-v2.5.7/">xmake v2.5.7 发布，包依赖锁定和 Vala/Metal 语言编译支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
            
        
        
            </ul>
        

        <div class="post-recent">
    <div class="pre">

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        
    </div>

    <div class="nex">

        

        

        
        
        

        

        

        
        
        <p><strong>下一篇</strong> <a href="/cn/docs/xmake/manual/">接口手册</a></p>
        
    </div>
</div>


        <h2 id="comments">评论</h2>
        






<div id="gitalk-container"></div>
<link rel="stylesheet" href="/css/gitalk.css">
<script src="/js/gitalk.min.js"></script>

<script>
const gitalk = new Gitalk({
  clientID: '73946dc1d9e2276ad0da',
  clientSecret: '12a3cb94361ba3ebc6ecb68cf80d592bfaa8106d',
  repo: 'tboox.github.io',
  owner: 'waruqi',
  admin: ['waruqi'],
  id: location.pathname,       
  language: 'zh-CN',
  distractionFreeMode: false  
})

gitalk.render('gitalk-container')
</script>





    </div>
    <button class="anchor"><i class="fa fa-anchor"></i></button>
    <div class="right">
        <div class="wrap">

            <!-- codefund ads -->
            

            <!-- Content -->
            <div class="side content">
                <div>
                    内容
                </div>
                <ul id="content-side" class="content-ul">
                    <li><a href="#english">English</a></li>
                    <li><a href="#similar_posts">相关文章</a></li>
                    <li><a href="#comments">评论</a></li>
                </ul>
            </div>


            <!-- baidu ads -->
            
            
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    链接
                </div>
                <ul class="content-ul">
                  <li><a href="http://github.com/waruqi/tbox">tbox</a></li>
                  <li><a href="http://www.xmake.io">xmake</a></li>
                  <li><a href="https://github.com/waruqi">github</a></li>
                </ul>
            </div> 

            <!-- xmake courses -->
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    xmake 入门课程
                </div>
                <a href="https://xmake.io/#/zh-cn/about/course" target="_blank">
                <img src="/static/img/xmake-course.png" alt="course" width="256" height="193">
                </a>
            </div>

            <!-- qqgroup -->
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    技术交流群（QQ）
                </div>
                <img src="/static/img/qqgroup.png" alt="qqgroup" width="256" height="284">
            </div> 

            <!-- google ads -->
            

            <!-- baidu ads -->
            

        </div>
    </div>

    <!-- baidu ads -->
    
</div>
<script>
/**
 * target _blank
 */
(function() {
    var aTags = document.querySelectorAll('article a:not([id])')
    for (var i = 0; i < aTags.length; i++) {
        aTags[i].setAttribute('target', '_blank')
    }
}());
</script>
<script src="/js/pageContent.js " charset="utf-8"></script>



    <footer class="site-footer">
    <div class="wrapper">
        <p class="description">
             Copyright (c) 2016-2020 tboox.org 
        </p>
        <p class="contact">
            
            <a href="https://github.com/waruqi" title="GitHub"><i class="fa fa-github" aria-hidden="true"></i></a> 
             
            
            <a href="mailto:waruqi@gmail.com" title="email"><i class="fa fa-envelope-o" aria-hidden="true"></i></a> 
            
            
            <a href="https://twitter.com/waruqi" title="Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> 
            
            <a href="/feed.xml" title="feed"><i class="fa fa-feed" aria-hidden="true"></i></a> 
        </p>
        <p class="power">
            <span>
                Site powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://github.com/Gaohaoyang">HyG</a> & <a href="https://pages.github.com/">Github Pages</a>.
            </span>
        </p>
    </div>
</footer>

    <div class="back-to-top">
    <a href="#top" class="scroll">
        <i class="fa fa-arrow-up" aria-hidden="true"></i>
    </a>
</div>

    <script src=" /js/main.js " charset="utf-8"></script>
    <script src=" /js/scroll.min.js " charset="utf-8"></script>
  </body>

</html>
